Remove possible line-breaks from description.
authoroliskoli <oliskoli>
Tue, 25 Apr 2006 18:55:37 +0000 (18:55 +0000)
committeroliskoli <oliskoli>
Tue, 25 Apr 2006 18:55:37 +0000 (18:55 +0000)
kml.c

diff --git a/kml.c b/kml.c
index 33eba05000a63bf3259bd6239185e74e2f7724a9..531712ff595094811b5ab71cfa114630bcee1bec 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -143,7 +143,16 @@ void wpt_name(const char *args, const char **unused)
 
 void wpt_desc(const char *args, const char **unused)
 {
-       if (args) wpt_tmp->description = xstrappend(wpt_tmp->description, args);
+       if (args) {
+               char *tmp, *c;
+               
+               tmp = xstrdup((char *)args);
+               c = lrtrim(tmp);
+               if (*c) {
+                       wpt_tmp->description = xstrappend(wpt_tmp->description, c);
+               }
+               xfree(tmp);
+       }
 }
 
 void wpt_coord(const char *args, const char **attrv)